<?php
		require_once("alipay.config.php");
		require_once("lib/alipay_notify.class.php");
		
		//计算得出通知验证结果
		$alipayNotify = new AlipayNotify($alipay_config);
		
		$str=serialize($_POST);
		
		$verify_result = $alipayNotify->verifyNotify();
		
		if($verify_result) 
		{
			$str=urlencode($str);

			$url="http://test.hbwksc.com/index.php?con=Paymchongzhi&act=index&str={$str}&payment_id=1";

			$curl = curl_init();
			curl_setopt($curl, CURLOPT_URL, $url);
			curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
			curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60);  
			$data = curl_exec($curl);
			echo $data;
		}
		else 
		{
		    //验证失败
		    echo "fail";
		
		    //调试用，写文本函数记录程序运行情况是否正常
		    //logResult("这里写入想要调试的代码变量值，或其他运行的结果记录");
		}
?>